package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ServiceFeeSettingsMapper;
import com.ruoyi.system.domain.ServiceFeeSettings;
import com.ruoyi.system.service.IServiceFeeSettingsService;

/**
 * 服务费设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-09
 */
@Service
public class ServiceFeeSettingsServiceImpl implements IServiceFeeSettingsService
{
    @Autowired
    private ServiceFeeSettingsMapper serviceFeeSettingsMapper;

    /**
     * 通过id查询服务费设置
     *
     * @param id 服务费设置主键
     * @return 服务费设置
     */
    @Override
    public ServiceFeeSettings selectServiceFeeSettingsById(Long id)
    {
        return serviceFeeSettingsMapper.selectServiceFeeSettingsById(id);
    }

    /**
     * 查询服务费设置列表
     *
     * @param storeName 门店名称
     * @return 服务费设置
     */
    @Override
    public List<ServiceFeeSettings> selectServiceFeeSettingsListByName(String storeName)
    {
        return serviceFeeSettingsMapper.selectServiceFeeSettingsListByName(storeName);
    }

    /**
     * 新增服务费设置
     *
     * @param serviceFeeSettings 服务费设置
     * @return 结果
     */
    @Override
    public int insertServiceFeeSettings(ServiceFeeSettings serviceFeeSettings)
    {
        return serviceFeeSettingsMapper.insertServiceFeeSettings(serviceFeeSettings);
    }

    /**
     * 修改服务费设置
     *
     * @param serviceFeeSettings 服务费设置
     * @return 结果
     */
    @Override
    public int updateServiceFeeSettings(ServiceFeeSettings serviceFeeSettings)
    {
        return serviceFeeSettingsMapper.updateServiceFeeSettings(serviceFeeSettings);
    }

    /**
     * 通过id批量删除服务费设置信息
     *
     * @param ids 需要删除的服务费设置主键
     * @return 结果
     */
    @Override
    public int deleteServiceFeeSettingsByIds(Long[] ids)
    {
        return serviceFeeSettingsMapper.deleteServiceFeeSettingsByIds(ids);
    }

    /**
     * 通过id删除服务费设置信息
     *
     * @param id 服务费设置主键
     * @return 结果
     */
    @Override
    public int deleteServiceFeeSettingsById(Long id)
    {
        return serviceFeeSettingsMapper.deleteServiceFeeSettingsById(id);
    }
}
